package com.oig.base.api.factory;

import com.oig.base.api.AreaService;
import com.oig.base.api.fallback.AreaServiceFallBackImpl;
import org.springframework.cloud.openfeign.FallbackFactory;

public class AreaServiceFallBackFactory implements FallbackFactory<AreaService> {

    @Override
    public AreaService create(Throwable cause) {
        AreaServiceFallBackImpl areaServiceFallBack = new AreaServiceFallBackImpl();
        areaServiceFallBack.setCause(cause);
        return areaServiceFallBack;
    }

}
